import request from "@/utils/request";

/**
 * 登陆
 */
export function login(username: string, password: string) {
  const data = {
    username,
    password,
  };
  return request({
    url: "/login",
    headers: {
      isToken: false,
      repeatSubmit: false,
    },
    method: "post",
    data: data,
  });
}
/**
 * 注册
 */
export function register(data: any) {
  return request({
    url: "/register",
    headers: {
      isToken: false,
    },
    method: "post",
    data: data,
  });
}
/**
 * 退出登陆
 */
export function logout() {
  return request({
    url: "/logout",
    method: "post",
  });
}
